package com.sheyu.mall.product.service;

import com.sheyu.mall.product.dao.attr.AttrAttrgroupRelationDao;
import com.sheyu.mall.product.service.attr.vo.AttrGroupRelationVo;
import com.sheyu.mall.product.vo.AttrGroupVo;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import java.util.ArrayList;
import java.util.List;

/**
 * @author sheyu
 * @Desciption:
 * @date 2020/10/10 3:56 下午
 */
@SpringBootTest
@RunWith(SpringRunner.class)
public class AttrAttrGroupRelation {

    @Autowired
    private AttrAttrgroupRelationDao attrAttrgroupRelationDao;

    @Test
    public void testDeleteBatchRelationIds(){
        List<AttrGroupRelationVo> attrGroupRelationVoList = new ArrayList<>();

        AttrGroupRelationVo attrGroupRelationVo = new AttrGroupRelationVo();
        attrGroupRelationVo.setAttrGroupId(2L);
        attrGroupRelationVo.setAttrId(7L);
        attrGroupRelationVoList.add(attrGroupRelationVo);
        attrAttrgroupRelationDao.deleteBatchRelationIds(attrGroupRelationVoList);
    }
}
